

#include<iostream>
#include"stack.h"
#include"queue.h"
#include"myHeap.h"
using namespace std;


namespace linhui
{
	void test_stack()
	{
		stack<int> st;
		st.push(9);
		st.push(4);
		st.push(6);
		st.push(2);
		st.push(8);
		while (!st.empty())
		{
			cout << st.top() << " ";
			st.pop();
		}
	}
	void test_queue()
	{
		queue<int> qu;
		qu.push(65);
		qu.push(3);
		qu.push(55);
		qu.push(35);
		qu.push(690);
		while (!qu.empty())
		{
			cout << qu.front() << " ";
			qu.pop();
		}
	}
	void test_heap()
	{
		heap<int> hp;
		hp.push(4);
		hp.push(30);
		hp.push(1);
		hp.push(6);
		hp.push(50);
		hp.push(54);
		hp.push(5);
		hp.push(10);
		//hp.pop();

		hp.print();
		vector<int> v = { 4,3,6,9,5,4,7,1,2,5,8,100,0 };
		//hp.HeapSort({ 4,3,6,9,5,4,7,1,2,5,8,100,0 });
		hp.HeapSort(v);
		hp.print();
		for (auto au : v)
		{
			cout << au << " ";
		}

	}
}

int main()
{
	linhui::test_heap();
	//linhui::test_stack();
	//linhui::test_queue();
	

	return 0;
}
